{tpl head}
<div class="mbx"><span class="fl"><a href="?">工作小助手管理中心</a>--{$name} </span><span class="fr"><a href="?c={$classname}&a=info">添加分栏</a></span> </div>
<table id="bstable" class="new_table" width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
	<thead> <tr class="n_bt"><td colspan="6" align="center">工作小助手系统</td></tr>
		<tr><th colspan='6' class="thbt">【{$title}】</th></tr>
	</thead>
    <tr>
        <td align="center"  class="thbt hr">ID</td>
        <td align="center"  class="thbt hr">单元</td>
        <td align="center"  class="thbt hr">小区</td>
        <td align="center"  class="thbt hr">排序</td>
        <td align="center"  class="thbt hr">显示</td>
        <td align="center"  class="thbt">操作</td>
    </tr>
    {loop $oj $v}
    <tr>
        <td width='4%'  class="hr" align="center" >{$v.id}</td>
        <td  class="hr" align="center">{$v.name}</td>
        <td  class="hr" align="center">{$v.sname}</td>
        <td class="hr" align="center">{$v.sort}</td>
        <td class="hr" align="center"><a href="javascript:void(0);" onclick="is_show(this,{$v.id});" class="{if $v.show}show{else}hide{/if}"></a>
        </td>
        <td align="center"><a class="mod" href="?c={$classname}&a=info&id={$v.id}">修改</a> <a class="del" href="javascript:void (0);" onclick="del('?c={$classname}&a=del&id={$v.id}');">删除</a></td>
    </tr>
    {/loop}
</table>
<script type="text/javascript">
    function del(url){
        $.get(url,function(data){
            dalert(data);
        });
    }
    function is_show(obj,id){
        if(obj.className=='ok'){
            obj.className='hide';
            $.get("?c={$classname}&a=isshow&is_show=0&id="+id);
        }else{
            obj.className='ok';
            $.get("?c={$classname}&a=isshow&is_show=1&id="+id);
        }
        return true;
    }
</script>
{tpl foot}
